package day01;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.awt.*;
import java.util.Scanner;

public class HelloWorld{
    public static void main(String args[]){
        int i=1;
        System.out.println("斐波那契数列");
        HelloWorld helloWorld = new HelloWorld();
        for (int j = 1; j <20 ; j++) {
            int b = helloWorld.fun(j);
            System.out.print(b+"  ");
        }


}
    public int fun(int a){
        int b = 1;
        if (a ==1||a==2) {
            return b;
        }else {
            return fun(a-1)+fun(a-2);
        }
    }

}